work around DG-100 getconfig issues (#519)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Thu, 26 Mar 2020 22:05:36 +0000 (16:05 -0600)
committerGitHub <noreply@github.com>
Thu, 26 Mar 2020 22:05:36 +0000 (16:05 -0600)
* work around dg-100 getconfig issues.

Don't issue the getconfig command on the DG-100.  Different DG-100
devices seem to return different numbers of bytes, which leads
to checksum errors, which we treat as fatal.  Before release
1.5.1 we didn't issue this command.  It was apparently added because
it changed the status light to green on the DG-200.

* restore unintended whitespace change.

dg-100.cc

index 6535ff99a089e7c239effc4c332a0540d1a41385..094e17c5951f7a62f5bc54ea18cc3013f1926ac7 100644 (file)
--- a/dg-100.cc
+++ b/dg-100.cc
@@ -636,7 +636,14 @@ dg100_getfiles()
     int filenum = headers.data[i];
     dg100_getfile(filenum, &track);
   }
-  dg100_getconfig();       // To light on the green LED on the DG-200
+  /* Different DG-100 devices seem to return different numbers of bytes
+   * from the getconfig command.  This can result in a mismatched checksum,
+   * which we treat as a fatal error.  Avoid this mess by not issuing the
+   * getconfig command on DG-100 devices.
+   */
+  if (strcmp(model->name, "DG-100") != 0) {
+    dg100_getconfig();       // To light on the green LED on the DG-200
+  }
 }
 
 static int